The control for enabling/disabling do-not-disturb will be moved into
quick settings. It makes sense to then also move the indicator, so stop
showing the do-not-disturb status in the top bar's messages indicator.
Instead, just hide the indicator altogether when do-not-disturb
is active.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3691>
_init() {
super._init({
style_class: 'messages-indicator',
+ icon_name: 'message-indicator-symbolic',
visible: false,
y_expand: true,
y_align: Clutter.ActorAlign.CENTER,
}
_sync() {
- let doNotDisturb = !this._settings.get_boolean('show-banners');
- this.icon_name = doNotDisturb
- ? 'notifications-disabled-symbolic'
- : 'message-indicator-symbolic';
- this.visible = doNotDisturb || this._count > 0;
+ const doNotDisturb = !this._settings.get_boolean('show-banners');
+ this.visible = !doNotDisturb && this._count > 0;
}
});